<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"><title>部落格首頁樣式</title><link rel="stylesheet" type="text/css" href="wowbuty.css"><script type="text/javascript" src="jquery-1.2.6.min.js"></script></head><body><div id="page-template">
<!-- ######################################################### -->


<!--
 醫學美容糾察隊 - PIXNET's layout engine
 HTML template for homepage
 by HappyDenn | 20100118
-->
<textarea id="template-area">
    <div id="login-bar" class="align-right">{$T.loginBar}</div>
</textarea>


<!-- ######################################################### -->
</div><div id="body-div"><div id="javascript">
<!-- ######################################################### -->


<!--
 醫學美容糾察隊 - PIXNET's layout engine
 Main JavaScript section
 by HappyDenn | 20100118
-->
<!-- save the original pixnet's jQuery -->
<script type="text/javascript">var jQuery_pix = jQuery.noConflict(true);</script>
<!-- load some libraries -->
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.0/jquery.min.js"></script>
<script type="text/javascript" src="http://dl.dropbox.com/u/255959/wowbuty/jquery.jtemplates.js"></script>
<!-- main script -->
<script type="text/javascript">
/* wowbuty object */
var wowbuty = new Object();

/* inject the new container before pixnet's old container */
wowbuty.container = $('<div/>').attr('id', 'wowbuty-container').insertBefore('#body-div');

/* attach page template */
wowbuty.container.setTemplateElement('template-area', undefined, {filter_data: false});

/* determine page type */
wowbuty.pageType = 'home';
wowbuty.baseUrl = 'http://wowbuty.pixnet.net/blog';
var currentPath = window.location.href.substr(wowbuty.baseUrl.length);
if (currentPath == '') {
    wowbuty.pageType = 'home';
} else if (currentPath.search(/^\/post\/.+$/) != -1) {
    wowbuty.pageType = 'article';
}

/* data to insert */
var data = new Object();
/* extract stuff from login-bar */
var loginBar = $('#login-bar').clone();
loginBar.find('script').remove();
data.loginBar = loginBar.html();

/* process page template with data */
console.log(data);
wowbuty.container.processTemplate(data);

</script>
<!-- end of usage, revert jQuery back to pixnet's -->
<script type="text/javascript">var jQuery = jQuery_pix.noConflict(true);</script>


<!-- ######################################################### -->
</div></div></body></html>
